package com.apartment.sevice.impl;


import com.apartment.dao.LandlordDao;
import com.apartment.data.entity.Apartment;
import com.apartment.data.entity.Landlord;
import com.apartment.sevice.LandlordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

/**
 * Author : xuzhiyong
 * Date : 2022/5/31 15:05
 */
@Service
public class LandlordServiceImpl implements LandlordService {
    @Autowired
    private LandlordDao landlordDao;

    @Override
    public Landlord landlordLogin(String username, String password) {
        return landlordDao.findByUsernameAndPassword(username,password);
    }

    @Override
    public Landlord findLandlordByUsername(String username) {
        return landlordDao.findLandlordByUsername(username);
    }

    @Override
    public Landlord findLandlordByMail(String mail) {
        return landlordDao.findLandlordByMail(mail);
    }

}
